You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > TDenseMtxVec Class > TDenseMtxVec Methods > NormC Method > TDenseMtxVec.NormC Method ([In] TDenseMtxVec, bool)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
TDenseMtxVec.NormC Method ([In] TDenseMtxVec, bool)

The C-norm.

Syntax
C#
Visual Basic
public double NormC([In] TDenseMtxVec Vec, bool RelativeError);

C norm: ||V-Vec||, where V is the calling vector.

If the NormC is called without any parameters, the NormC calculates the norm of the calling vector. The C norm of ||V-Vec|| is defined by the formula: 

 

 

If RelativeError is true then the computed norm is divided by the norm of V, and the function returns the "relative error": 

 

 

 

using Dew.Math; using Dew.Math.Units; namespace Dew.Examples() { void Example() { TVec a,b; MtxVec.CreateIt(out a, out b); try { a.SetIt(false, new double[] {1,2,3,4}); a.SetIt(false, new double[] {4,3,2,1}); double c = a.NormC(b,true); } finally { MtxVec.FreeIt(ref a,ref b); } } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!